<?php

namespace App\Http\Controllers;

use App\Library\Requests\Base\ShopProductSpecNumberRequest;
use App\Library\Requests\ShopProductSpec\ShopProductSpecAddRequest;
use App\Library\Requests\ShopProductSpec\ShopProductSpecEditPriceRequest;
use App\Library\Requests\ShopProductSpec\ShopProductSpecEditRequest;
use App\Library\Requests\ShopProductSpec\ShopProductSpecEditStockRequest;
use App\Library\Requests\ShopProductSpec\ShopProductSpecPageRequest;
use App\Library\Service\ShopProductSpecService;
use Illuminate\Http\JsonResponse;

class ShopProductSpecController extends BaseController
{
    public function __construct(ShopProductSpecService $service)
    {
        $this->service = $service;
    }

    /**
     * paging
     * @param ShopProductSpecPageRequest $request
     * @return JsonResponse
     */
    public function paging(ShopProductSpecPageRequest $request): JsonResponse
    {
        return $this->service->paging($request);
    }

    /**
     * add
     * @param ShopProductSpecAddRequest $request
     * @return JsonResponse
     */
    public function add(ShopProductSpecAddRequest $request): JsonResponse
    {
        return $this->service->add($request);
    }

    /**
     * edit
     * @param ShopProductSpecEditRequest $request
     * @return JsonResponse
     */
    public function edit(ShopProductSpecEditRequest $request): JsonResponse
    {
        return $this->service->edit($request);
    }

    /**
     * detail
     * @param ShopProductSpecNumberRequest $request
     * @return JsonResponse
     */
    public function detail(ShopProductSpecNumberRequest $request): JsonResponse
    {
        return $this->service->detail($request);
    }

    /**
     * delete
     * @param ShopProductSpecNumberRequest $request
     * @return JsonResponse
     */
    public function delete(ShopProductSpecNumberRequest $request): JsonResponse
    {
        return $this->service->delete($request);
    }

    /**
     * editPrice
     * @param ShopProductSpecEditPriceRequest $request
     * @return JsonResponse
     */
    public function editPrice(ShopProductSpecEditPriceRequest $request): JsonResponse
    {
        return $this->service->editPrice($request);
    }

    /**
     * editStock
     * @param ShopProductSpecEditStockRequest $request
     * @return JsonResponse
     */
    public function editStock(ShopProductSpecEditStockRequest $request): JsonResponse
    {
        return $this->service->editStock($request);
    }
}
